from celery import shared_task
import time
# 记录日志：
import logging
logger = logging.getLogger("django")

@shared_task(name="send_sms")
def send_sms( name,datas):
    print("向%s发送邮件..."%name)
    time.sleep(5)
    print("向%s发送邮件完成"%name)
    return "ok"


from utils.mysdk import send_message
#新建异步任务
@shared_task(name='send')
def sendmsg(phone,code):
    #就是管着发短信a
    return send_message(phone,code)